package 笔试.美团;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @author:谢君臣
 * @Date:2021/8/15-8:22
 * @version:1.0
 * @function: System.out.println(String.format("%.2f", max/2));
 */
public class MT81501 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int T = scanner.nextInt();
        for (int i = 0;i<T;i++){
            int n = scanner.nextInt();
            int[] arr = new int[n];
            for (int j = 0; j < n; j++) {
                arr[j] =scanner.nextInt();
            }
            if (!function(arr,n))
                System.out.println("No");
            else
                System.out.println("Yes");
         }
    }

    private static boolean function(int[] arr, int n) {
        Arrays.sort(arr);
        for (int i = 0; i < n; i++) {
            if (arr[i]==i+1)
                continue;
            else
                return false;
        }
        return true;
    }

}
